<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
</head>
<body>
<div id="app">
<!--    v-model手动实现-->
    <input type="text" :value="msg" @input="msg=$event.target.value">
    <p>{{msg}}</p>
<!--    v-model的使用-->
    <input type="text" v-model="msg">

<!--    v-model绑定单选框-->
    <hr>
    <input type="checkbox" v-model="isAgree">我同意该协议
    <p>您{{isAgree? '同意':'不同意'}}该协议</p>
    <hr>
<!--    v-model绑定单选框-->
    <input type="radio" v-model="sex" value="男">男
    <input type="radio" v-model="sex" value="女">女
<!--    v-model绑定单选框-->
    <hr>
    <select v-model="likeOneCity">
        <option value="深圳">深圳</option>
        <option value="上海">上海</option>
        <option value="北京">北京</option>
        <option value="杭州">杭州</option>
    </select>
<!--    v-model绑定多选框-->
    <hr>
    <select v-model="likeCity" multiple>
        <option value="深圳">深圳</option>
        <option value="上海">上海</option>
        <option value="北京">北京</option>
        <option value="杭州">杭州</option>
    </select>
<!--    v-model绑定文本域-->
    <hr>
    <textarea v-model="text"></textarea>
</div>
<script>
    Vue.config.productionTip = false
    const vm = new Vue({
        el: '#app',
        data() {
            return {
                msg:'',
                isAgree:false,
                sex:'',
                likeOneCity:'深圳',
                likeCity:['北京'],
                text:''
            }
        }
    })
</script>
</body>
</html>